For an LLM to decide whether, when, and how to enter a stock/ETF trade, I would separate the input into three layers:
1. Should I trade this asset at all?
2. Is now the right time to enter?
3. What exact entry, stop, target, and size should I use?
For a 1–3 day swing-trading system, the LLM should ideally receive the following.
| Data block | Key data | What the LLM decides |
|---|---|---|
| Market regime | SPY, QQQ, RSP, IWM trend; VIX; rates; credit spreads; breadth; liquidity | Long/short bias and whether to trade |
| Sector / industry | Sector ETF trend, relative strength, breadth, flows | Whether the stock has sector support |
| Daily price structure | 200–300 daily OHLCV bars | Overall trend, major support/resistance |
| Intraday structure | 4h, 1h, 15m/5m OHLCV | Exact entry timing |
| Trend indicators | EMA 8/21/50, SMA 50/200, ADX | Trend quality |
| Momentum | RSI, MACD, ROC, relative strength | Whether momentum supports the trade |
| Volatility | ATR, realized vol, Bollinger width, IV | Stop distance and expected move |
| Volume | Relative volume, volume trend, volume profile | Confirmation of institutional participation |
| Support/resistance | Recent highs/lows, gaps, VWAP, AVWAP, volume nodes | Entry/invalidation levels |
| Catalysts | Earnings, guidance, analyst changes, company news, macro events | Whether a move has a fundamental driver |
| Positioning | Short interest, institutional ownership, ETF flows | Crowding and squeeze risk |
| Options data | IV, skew, put/call, unusual volume, OI, gamma positioning | Expected volatility / positioning |
| Order flow | Bid/ask, spread, trades, imbalance, L2/L3 if available | Fine entry timing and liquidity |
| Cross-asset context | Rates, USD, oil, gold, commodities relevant to stock | Macro confirmation |
| Risk constraints | Max loss, portfolio exposure, correlations | Position size / permission |
| Execution data | Bid/ask, spread, liquidity, slippage | Limit vs marketable limit, entry price |
But I would not give all of that raw data directly to the LLM. A better architecture is to compute deterministic features first and give the LLM a structured Market Snapshot + Asset Snapshot.
For example:
MARKET
Regime: moderately bullish
SPY trend: bullish
QQQ trend: bullish
RSP trend: neutral
IWM trend: weak
Breadth: 58%
VIX: 16.8, falling
10Y yield: +6bp today
Credit: stable
Macro risk next 24h: CPI tomorrow 08:30
SECTOR
Sector: Semiconductors
Trend: bullish
Relative strength vs SPY: +1.8%
5-day sector breadth: 72%
Sector ETF volume: 1.3x average
ASSET
Ticker: NVDA
Price: 184.30
Daily:
Trend: bullish
EMA8: 181.20
EMA21: 176.50
EMA50: 169.80
ATR14: 6.20
RSI14: 63
ADX14: 27
Structure:
Support: 181.50 / 177.80
Resistance: 185.00 / 190.40
20-day high: 185.00
Relative strength:
vs SPY: strong
vs SOXX: strong
Volume:
RVOL: 1.42
Accumulation: positive
Catalyst:
New product announcement yesterday
Earnings: 18 days away
Intraday:
1h trend: bullish
15m trend: bullish
VWAP: 182.70
Opening range high: 184.80
Intraday support: 183.10
Order flow:
Spread: $0.03
Bid/ask imbalance: +18%
Aggressive buy volume: positive
POSITION
Current holdings: none
Max risk: $1,000
Correlation to portfolio: moderate
Then the LLM's job becomes much more constrained.
It evaluates something like:
Trade quality =
Market × Sector × Asset × Catalyst × Setup × Risk
For example:
Market regime +1
Sector confirmation +2
Stock relative strength +2
Trend +2
Catalyst +1
Volume +1
Positioning 0
Event risk -1
--------------------------
Trade score +8
Below a defined threshold, the answer is simply:
NO TRADE
This is important. The LLM should not be forced to invent an entry for every stock.
This requires higher-frequency price information.
The LLM should know which entry setup is currently occurring:
Then it can say, for example:
Do not enter now.
Entry condition:
15-minute close above $185.00
AND
RVOL > 1.3
AND
SOXX remains above VWAP.
Preferred entry:
$185.10–185.50
This is substantially better than asking:
"Is NVDA a buy?"
Now the model needs trade geometry.
For example:
Entry: $185.20
Stop: $181.80
Risk/share: $3.40
Target 1: $190.40
Target 2: $194.50
Reward/risk:
T1 = 1.53R
T2 = 2.74R
Max account risk: $1,000
Position:
1000 / 3.40 = 294 shares
The system should additionally specify:
Entry type
and:
Trade management
I would actually use two separate data sets.
Slow-moving information:
This answers:
Is this a trade worth taking?
Fast-moving information:
This answers:
Should I enter right now?
Mixing these two decisions often produces poor systems.
Given your 1–3 day swing horizon, I would give the LLM roughly this hierarchy:
MARKET SNAPSHOT
↓
SECTOR SNAPSHOT
↓
ASSET SNAPSHOT
↓
CATALYST / NEWS
↓
DAILY SETUP
↓
1H STRUCTURE
↓
5–15 MIN ENTRY TRIGGER
↓
EXECUTION / SPREAD / LIQUIDITY
↓
RISK + POSITION SIZE
And I would make one architectural change particularly explicit:
The LLM should choose among pre-defined entry strategies rather than invent an entry level from scratch.
For example, its permissible output could be:
TRADE_PERMISSION: YES
DIRECTION: LONG
SETUP:
breakout_retest
ENTRY_TRIGGER:
15m close > 185.00 followed by successful retest
ENTRY_ZONE:
184.80–185.30
STOP:
181.70
TARGET:
190.40
EXPECTED_R:
1.55
CONFIDENCE:
72%
INVALIDATION:
SOXX below VWAP or NVDA 15m close below 183.10
That makes the LLM a decision/interpretation layer, while deterministic code calculates prices, indicators, ATR, levels, risk, and execution constraints.
That is considerably safer and more backtestable than letting an LLM freely decide "buy NVDA at $185.27."